<!-- Copyright 2018 The Chromium Authors. All rights reserved.
     Use of this source code is governed by a BSD-style license that can be
     found in the LICENSE file. -->

<link rel="import" href="chrome://resources/html/polymer.html">

<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-progress/paper-progress.html">


<link rel="import" href="/components/buttons/oobe_text_button.html">
<link rel="import" href="/components/behaviors/multi_step_behavior.html">
<link rel="import" href="/components/behaviors/oobe_dialog_host_behavior.html">
<link rel="import" href="/components/behaviors/oobe_i18n_behavior.html">
<link rel="import" href="/components/common_styles/oobe_dialog_host_styles.html">
<link rel="import" href="/components/dialogs/oobe_adaptive_dialog.html">
<link rel="import" href="/components/dialogs/oobe_content_dialog.html">

<dom-module id="assistant-loading">
  <template>
    <style include="oobe-dialog-host-styles"></style>
    <link rel="stylesheet" href="assistant_loading.css">
    <link rel="stylesheet" href="assistant_shared_styles.css">
    <oobe-content-dialog id="loading-dialog" role="dialog" for-step="loading"
        no-buttons>
      <div slot="content" class="flex layout vertical center-justified">
        <div id="loading-content" class="content">
          <div>
            [[i18nDynamic(locale, 'assistantOptinLoading')]]
          </div>
          <paper-progress class="slow" indeterminate></paper-progress>
        </div>
      </div>
    </oobe-content-dialog>
    <oobe-adaptive-dialog id="error-dialog" role="dialog" hide-shadow
        for-step="error">
      <iron-icon slot="icon" icon="assistant-32:assistant"
          aria-label$="[[i18nDynamic(locale, 'assistantLogo')]]">
      </iron-icon>
      <h1 slot="title">
        [[i18nDynamic(locale, 'assistantOptinLoadErrorTitle')]]
      </h1>
      <div slot="subtitle">
        [[i18nDynamic(locale, 'assistantOptinLoadErrorMessage')]]
      </div>
      <div slot="bottom-buttons">
        <oobe-text-button id="skip-button" on-click="onSkipTap_"
            disabled="[[buttonsDisabled]]" text-key="assistantOptinSkipButton">
        </oobe-text-button>
        <oobe-text-button id="retry-button" inverse on-click="onRetryTap_"
            disabled="[[buttonsDisabled]]" text-key="assistantOptinRetryButton">
        </oobe-text-button>
      </div>
    </oobe-adaptive-dialog>
  </template>
</dom-module>
